import React, { Component } from 'react';
import { Link } from 'react-router-dom'
import { Pagination } from 'antd';

function itemRender(current, type, originalElement) {
    if (type === 'prev') {
      return <a>上一页</a>;
    }
    if (type === 'next') {
      return <a>下一页</a>;
    }
    return originalElement;
  }

class mymessage extends Component {
    constructor(props) {
        super(props);
        this.state = {
            arr: [1, 1, 1, 1, 1, 1, 1, 1,1]
        }
    }
    render() {
        return (
            <div className="mymessage">
                <div className="mymessage-t">
                    我的消息
                </div>
                <div className="mymessage-c">
                    <dl>
                        <dd>
                            <p>标题</p>
                            <p>发送时间</p>
                            <p>状态</p>
                            <p>操作</p>
                        </dd>
                        {this.state.arr.map((v,i)=>{
                            return(
                                <dt key="i">
                                    <p>您的货物已发货您的货物已发货您的货物已发货</p>
                                    <p>2015年9月23日 15:25:07</p>
                                    <p className="nolook">未查看</p>
                                    <p><Link to="/people/mymessagedetail">查看</Link>&nbsp;&nbsp;|&nbsp;&nbsp;<Link to="###">删除</Link></p>
                                </dt>)
                        })}
                    </dl>
                    
                    <div className="fenye">
                    <Link to="###">首页</Link>
                    <Pagination showSizeChanger={false} showQuickJumper total={500} itemRender={itemRender} />
                    <Link to="###">确定</Link>
                    <span>共500条</span>
                    </div>
                </div>
            </div>
        );
    }
}

export default mymessage;